package com.example.jetour_line.map.mapview.MarkerMap;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.jetour_line.R;
import com.example.jetour_line.map.mapview.BaseMarkerView;

public class CommonDetailMarkerView extends BaseMarkerView {
    TextView index_txt;
    ImageView head_img;
    LinearLayout head_lay;
    ImageView sel_view;
    public CommonDetailMarkerView(Context context, int index,String url) {
        super(context);
        View view = inflate(getContext(), R.layout.common_detail_marker_view, this);
        index_txt = view.findViewById(R.id.index_txt);
        head_img = view.findViewById(R.id.head_img);
        head_lay = view.findViewById(R.id.head_lay);
        sel_view = view.findViewById(R.id.sel_view);
        index_txt.setText(index+"");

        if(url == null || url.length()<=0){
            sel_view.setVisibility(GONE);
            head_img.setVisibility(GONE);
            head_lay.setVisibility(GONE);
            index_txt.setVisibility(VISIBLE);
        }else {
            sel_view.setVisibility(VISIBLE);
            head_img.setVisibility(VISIBLE);
            head_lay.setVisibility(VISIBLE);
            index_txt.setVisibility(GONE);
        }

    }
}
